package com.ysxsoft.wdg.adapter;

import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ysxsoft.wdg.R;
import com.ysxsoft.wdg.bean.zy.GoodsBean;


//include_st_goods
public class ShopcartConfirmAdapter extends BaseQuickAdapter<GoodsBean,BaseViewHolder> {


    public ShopcartConfirmAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper,  GoodsBean item) {
        helper.setText(R.id.tv_goods_name,item.getName());
        //price:价格  l_price:到手价格  rebate:返利
        helper.setText(R.id.tv_rules,item.getRule_name());
        helper.setText(R.id.tv_money,mContext.getString(R.string.price_rmb,item.getL_price()));
        helper.setText(R.id.tv_num,"x"+item.getNum());

        ImageView imageView = helper.getView(R.id.iv_goods);
        Glide.with(mContext).load(item.getPic()).into(imageView);
    }
}
